import React, { Component } from 'react'
import PropTypes from 'prop-types';
export class Main extends Component {
  // 
 
  render() {
const {list}=this.props
    return (
      <div className='main'>
            <ul className="head">
       {
        list.map((item)=>{
          return<li key={item.id}>{item.user}</li>
        })

        }
    </ul>
        <ul>   
        {
          list.map((item)=>{
          return   item.child.map((i)=>{
                 return <li key={i.id}>
              <span> {i.title} </span>
             <span>这是一段描述 </span>
             <span>  {i.num}万</span>
            <span>  {i.type}  </span>
           <span> {i.date}</span>
            
             <span><button>编辑</button> <button>订阅警报</button></span>
             </li>
          })  
            })
          
            }
        </ul>
      </div>
    )
  }
}

  Main.defaultProps = {
   
    color: 'yellow'
  };
  Main.propTypes = {
    list: PropTypes.array
  };
export default Main